var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("AudioManager"),
    i = e("ChooseHoreViewUI"),
    r = cc._decorator,
    s = r.ccclass,
    l = r.property,
    c = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (
                (t.guide_info_view = []),
                (t.continue_btn = null),
                (t.guide_index = 0),
                (t.hand_anime = null),
                (t.hand_pos = [cc.v3(100, 0, 0), cc.v3(100, 0, 0), cc.v3(0, -100, 0)]),
                t
            );
        }
        return (
            __extends(t, e),
            (t.prototype.initView = function () {
                (this.guide_index = 0), this.showGuideInfo(), this.continue_btn.on("click", this.showNextGuide, this);
            }),
            (t.prototype.showGuideInfo = function () {
                var e = this;
                this.continue_btn.active = !1;
                for (var t = 0; t < this.guide_info_view.length; t++)
                    this.guide_info_view[t].active = t == this.guide_index;
                a.default.getInstance().playFx("guide_" + (this.guide_index + 5)),
                    this.showhandAnime(),
                    this.scheduleOnce(function () {
                        e.continue_btn.active = !0;
                    }, 2);
            }),
            (t.prototype.showNextGuide = function () {
                this.guide_index++,
                    this.guide_index >= this.guide_info_view.length
                        ? (cc.find("Canvas/ChooseHoreViewUI").getComponent(i.default).loadFightPrefabs(),
                          this.node.parent.destroy())
                        : this.showGuideInfo();
            }),
            (t.prototype.showhandAnime = function () {
                var e = this;
                null != this.hand_anime && this.hand_anime.stop();
                var t = this.guide_info_view[this.guide_index].children[0],
                    o = t.getPosition();
                (this.hand_anime = cc
                    .tween(t)
                    .by(0.8, {position: this.hand_pos[this.guide_index]})
                    .call(function () {
                        t.setPosition(o), e.hand_anime.start();
                    })),
                    this.hand_anime.start();
            }),
            __decorate([l(cc.Node)], t.prototype, "guide_info_view", void 0),
            __decorate([l(cc.Node)], t.prototype, "continue_btn", void 0),
            __decorate([s], t)
        );
    })(n.default);
o.default = c;
